﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using University.Workshop.Model;
using University.Workshop.Business;

[assembly: CLSCompliant(true)]
namespace University.Workshop.Presenters
{
    public class RegisterPresenter: BasePresenter<IRegistrationEmployeeView>
    {
        public RegisterPresenter(IRegistrationEmployeeView view)
            :base(view)
        {

        }
        #region event
        public void CreateNewEmployee() 
        {
            try
            {
                EmployeeManager.RegisterEmployeeManager(View.CI,View.NameEmployee,View.Surname,View.WorkArea,View.Email,View.Telephone,View.Address);
                View.MessageWarnings = "Register complete";
            }
            catch (ArgumentException ar)
            {
                View.MessageWarnings = ar.Message;
            }           
        }

      
        #endregion
    }
    
}
